package com.bwei.like.mynewstop.activity;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.bwei.like.mynewstop.Bean.NewsCategoryRoot;
import com.bwei.like.mynewstop.R;

import java.io.Serializable;

public class WebView_activity extends AppCompatActivity {

    private WebView webView;
    private NewsCategoryRoot.DataBean dataBean;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_webview);
        initView();
        webView.loadUrl(dataBean.getUrl());
    }

    private void initView() {
        webView = (WebView) findViewById(R.id.webView);
        dataBean = (NewsCategoryRoot.DataBean) getIntent().getSerializableExtra("DataBean");
        WebSettings settings = webView.getSettings();
        webView.setWebViewClient(new WebViewClient());

    }
}
